#  author:张靖昆 date:2020/3/10 name:07_timedelta IDE:PyCharm
# timedelta 时间差类型
import datetime
now_time=datetime.datetime.now()
time1=now_time-datetime.timedelta(hours=1)# 一个小时之前
time1=now_time-datetime.timedelta(hours=-1)# 一个小时之后
# print(time1)
# print(type(time1))

end_time='2020-11-11 00:00:00'
end_time=datetime.datetime.strptime(end_time,"%Y-%m-%d %H:%M:%S")
my_time=end_time-now_time
print(type(my_time))
